package com.lsa.letcode.the7.reverse;


import org.junit.Assert;
import org.junit.Test;

public class ReverseIntTest {
	@Test
	public void test() {
		Solution s = new Solution();
		
		Assert.assertEquals(1, s.reverse(1));
		Assert.assertEquals(21, s.reverse(12));
		Assert.assertEquals(321, s.reverse(123));
		Assert.assertEquals(4321, s.reverse(1234));
		Assert.assertEquals(54321, s.reverse(12345));
		Assert.assertEquals(654321, s.reverse(123456));
		Assert.assertEquals(7654321, s.reverse(1234567));
		Assert.assertEquals(87654321, s.reverse(12345678));
		Assert.assertEquals(333, s.reverse(333));
		Assert.assertEquals(1, s.reverse(10));
		Assert.assertEquals(1, s.reverse(100));
		Assert.assertEquals(1, s.reverse(1000));
		Assert.assertEquals(1, s.reverse(1000000));
		Assert.assertEquals(0, s.reverse(1563847412));
		Assert.assertEquals(0, s.reverse(2147483647));
		Assert.assertEquals(0, s.reverse(Integer.MIN_VALUE));
		Assert.assertEquals(0, s.reverse(Integer.MAX_VALUE));
		Assert.assertEquals(-2143847412, s.reverse(-2147483412));
		Assert.assertEquals(-321, s.reverse(-123));
	}
}
